<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %> 
<script type="text/javascript">
function checkLogistic(progStatus){
	if(progStatus==4){
		$("#to_add_logistics").css("display","");
		$("#hidden_line").css("display","");
	}else{
		$("#to_add_logistics").css("display","none");
		$("#hidden_line").css("display","none");
	}
}
</script>
<form id="pagerForm" method="post" action="#rel#">
	<input type="hidden" name="pageNum" value="${currentPage }" /> 
	<input type="hidden" name="numPerPage" value="${numPerPage}" /> 
	<input type="hidden" name="orderField" value="${param.orderField}" /> 
	<input type="hidden" name="orderDirection" value="${param.orderDirection}" />
</form>
<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);"	action="order_already.action" method="post">
		<!--  -->
		<div class="searchBar nowrap">
			<p>
				<label>学校名称:</label>
				<input type="text" name="sclName" value="${sclName}" maxlength="20" />
			</p>
			<p><label>单据编号</label>
			<input type="text" name="rcoNo" value="${rcoNo}" maxlength="20" />
			</p>
			<p>
				<label>单据进度：</label>
				<select class="combox" name="progStatus">
					<option value="-1">---全部---</option>
					<option ${progStatus == '4'?"selected":""} value="4">通过</option>
					<option ${progStatus == '0'?"selected":""} value="0">驳回</option>
					<option ${progStatus == '9'?"selected":""} value="9">完成</option>
				</select>
			</p>
			<div class="subBar">
				<ul>
					<li>
						<div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
					</li>
				</ul>
			</div>
		</div>
	</form>
</div>


<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a  class="look" 
					href="orderDetail_lookdetail.action?rcoId={order_id}"  
					rel="rcod_wait_detail_already" 
					target="navTab"
					title="查看明细">
					<span>查看明细</span>
				</a>
			</li>
			<li class="line" id="hidden_line">line</li>
			<li><a class="icon-ok" id="to_add_logistics" href="order_sendUI.action?rcoId={order_id}" rel="add_logistics" target="dialog" warn="请选择一条补卡单据！" mask="true" width="400" height="200">	<span>发货</span></a></li>
			<li class="line">line</li>
			<li><a class="icon-ok" href="order_close.action?rcoId={order_id}"  target="ajaxTodo" warn="请选择一条补卡单据！"  title="确定补卡已完成吗?">	<span>补卡完成</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="120">
		<thead>
			<tr>
				<th align="center">序号</th>
				<th>单据编号</th>
				<th>学校名称</th>
				<th>补卡数量</th>
				<th>费用总额</th>
				<th>申请人</th>
				<th>申请时间</th>
				<th>审核结果</th>
				<th>处理人</th>
				<th>处理时间</th>
				<th>快递公司</th>
				<th>快递单号</th>
				<th>简要说明</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${recordList}" var="order" varStatus="status">
				<tr target="order_id" rel="${order.rcoId }" onclick="checkLogistic('${order.progStatus}');">
				<td>${(status.index+1) + (currentPage-1) * numPerPage}</td>
				<td>${order.rcoNo }</td>
				<td>${order.sclName }</td>
				<td>${order.rcoCountNumber }</td>
				<td>
					<c:choose>
						<c:when test="${order.rcoAmount==0 }">
							<span style="color:green;line-height: 21px;">免费</span>
						</c:when>
						<c:otherwise>
							${order.rcoAmount }
						</c:otherwise>
					</c:choose>
				</td>
				<td>${order.createOperName }</td>
				<td>
					<fmt:parseDate  value="${order.createTime}" var="createTime" pattern="yyyyMMddHHmmss"/>  
					<fmt:formatDate value="${createTime}" pattern="yyyy-MM-dd HH:mm:ss" /> 
				</td>
				<td>
					<c:choose>
						<c:when test="${order.progStatus==4 }">
							<span style="color:blue;line-height: 21px;">通过</span>
						</c:when>
						<c:when test="${order.progStatus==5 }">
							<span style="color:#400000;line-height: 21px;">已发货</span>
						</c:when>
						<c:when test="${order.progStatus==0 }">
							<span style="color:red;line-height: 21px;">驳回</span>
						</c:when>
						<c:when test="${order.progStatus==9 }">
							<span style="color:green;line-height: 21px;">补卡完成</span>
						</c:when>
					</c:choose>
				</td>
				<td>${order.dealOperName }</td>
				<td>
					<fmt:parseDate  value="${order.dealTime}" var="dealTime" pattern="yyyyMMddHHmmss"/>  
					<fmt:formatDate value="${dealTime}" pattern="yyyy-MM-dd HH:mm" /> 
				</td>
				<td>${application.expressMap[order.logisticsType]}</td>
				<td>${order.logisticsNo }</td>
				<td>${order.remark }</td>
			</tr>
			</c:forEach>
		</tbody>
	</table>
	
	<%@ include file="/WEB-INF/jsp/public/panelBar.jsp"%>	
</div>
